#include <ctime>
#include <iostream>
#include <string>
#include <boost/array.hpp>
#include <boost/bind.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/asio.hpp>
#include "KinectInterface.h"

using boost::asio::ip::udp;

class Server{

public:
    Server(boost::asio::io_service& io_service);
    ~Server();


    udp::socket socket_;
    udp::endpoint remote_endpoint_;
    boost::array<char, 1> recv_buffer_;

    boost::asio::io_service io_service;
    boost::asio::ip::udp::socket *socket;

 private:
    void start_receive();
    void handle_receive(const boost::system::error_code& error, std::size_t);
    void handle_send(boost::shared_ptr<std::string>, const boost::system::error_code&,std::size_t );
    
    std::string *msg;
};
